package service

import (
	"choujiang/common/models"
	"choujiang/common/db"
)

func GetMembers(userId int64, gameId string) []model.User {
	members := make([]model.User, 0)
	db.MysqlEngine.Where("user.game_id=? and user_extra.parent_id=?", gameId, userId).Join("INNER", "user_extra", "user.id = user_extra.user_id").Limit(3).Find(&members)
	return members
}
